package com.third.bank.controller;

import com.third.bank.entity.BusinessType;
import com.third.bank.service.BusinessTypeService;
import com.third.bank.util.BaseResponse;
import com.third.bank.util.ResultUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 业务类型表controller
 */
@Api(value = "/business", tags = {"业务类型表controller"})
@RestController
@RequestMapping("/business")
public class BusinessTypeController {

    @Autowired
    private BusinessTypeService businessTypeService;


    @ApiOperation(value = "", notes = "", httpMethod = "GET")
    @GetMapping("getAll")
    public BaseResponse<List<BusinessType>> getAllType() {
        List<BusinessType> businessTypeList = businessTypeService.list();
        return ResultUtils.success(businessTypeList);
    }

}
